package g2.routemaster.gui.general;

public enum EBonus {
   BADEN("Baden", 35, 60),
   BAIERN("Baiern", 510, 244),
   WYRTTEMBERG_HOHENZOLLERN("WyrttembergHohenzollern", 219, 217),
   SCHWEIZ_TYROL("SchweizTyrol", 266, 435),
   BOHMEN_SALZBURG("BohmenSalzburg", 762, 254),
   OUTSIDE_OF_BAIERN("OutsideOfBaiern", 0, 0),
   SPIELENDE("Spielende", 0, 0),
   LENGTH5("Length5", 30, 9),
   LENGTH6("Length6", 60, 9),
   LENGTH7("Length7", 90, 9),
   COACHCARD3("CoachCardLength3", 0, 0),
   COACHCARD4("CoachCardLength4", 0, 0),
   COACHCARD5("CoachCardLength5", 0, 0),
   COACHCARD6("CoachCardLength6", 0, 0),
   COACHCARD7("CoachCardLength7", 0, 0),
   UNKNOWN("Unknown", 0, 0);
   
   String nom;
   int x;
   int y;
   String imagePath;
   EBonus(String nom, int x, int y) {
      this.nom = nom;
      this.x = x;
      this.y = y;
   }

   public String nom() {
      return nom;
   }
   
   public int x() {
      return x;
   }
   
   public int y() {
      return y;
   }

   public static EBonus byNom(String nom) {
      if(nom != null) {
         for (EBonus o : values()) {
            if (o.nom().equals(nom)) {
               return o;
            }
         }
      }
      return UNKNOWN;
   }
}
